﻿namespace Example.Diagnostics
{
    using System.Diagnostics;
    using Xunit;

    public class ApplicationEventLogTests
    {
        [Fact]
        public void ctor()
        {
            Assert.NotNull(new ApplicationEventLog());
        }

        [Fact]
        public void is_EventLog()
        {
            Assert.IsAssignableFrom<EventLog>(new ApplicationEventLog());
        }

        [Fact]
        public void op_WriteEntry_string()
        {
            new ApplicationEventLog().WriteEntry("This is a test entry.");
        }

        [Fact]
        public void prop_Log_get()
        {
            Assert.Equal("Application", new ApplicationEventLog().Log);
        }

        [Fact]
        public void prop_MachineName_get()
        {
            Assert.Equal(".", new ApplicationEventLog().MachineName);
        }

        [Fact]
        public void prop_Source_get()
        {
            Assert.Equal("Example Company", new ApplicationEventLog().Source);
        }
    }
}